#include <cstdio>
#include <cmath>
#include <iostream>
using namespace std;

int ans = 0x7fffffff, a[2000001], n, p, tmp, k;

int main() { 
#ifndef LOCAL
    freopen("MrBB1.in", "r", stdin);
    freopen("MrBB1.out", "w", stdout);
#endif
    ios::sync_with_stdio(false);
    cin >> n;
    for (int i = 1; i <= n; i++) { 
        cin >> a[i];
        a[i + n] = a[i];
    }
    for (p = 0; p < n; p++) { 
        tmp = 0;
        for (int i = 1; i <= n; i++) { 
            tmp += abs(i - a[n + i - p]);
        }
        if (tmp < ans) { 
            ans = tmp;
            k = p;
        }
    }
    cout << ans << " " << k << endl;
}
